

import BaseLangManager from "./BaseLangManager";
import { LangSprite } from "./LangSprite";
export  class LangSpriteManager  extends BaseLangManager{

    clear(){
        
    }

    getValue(fileName:string){
        return this.path + this.getLangName() +"/"+ fileName;
    }

    update(){
        let rootNodes = cc.director.getScene().children;
        let allLocalizedLabels = [];
        for (let i = 0; i < rootNodes.length; ++i) {

            let labels = rootNodes[i].getComponentsInChildren(LangSprite);
            Array.prototype.push.apply(allLocalizedLabels, labels);
        }
        for (let i = 0; i < allLocalizedLabels.length; ++i) {
            let label = allLocalizedLabels[i];
            label.updateValue();
        }
    }

}
